/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: HP
 * Date: 2023 -05 -15
 * Time: 15:58
 */
public class Triangle {
    private double side1;
    private double side2;
    private double side3;

    public Triangle() {
        this.side1 = 0;
        this.side2 = 0;
        this.side3 = 0;
    }

    public void setTriangle(double a1, double a2, double a3) throws InvalidTriangleException {
        if (a1 + a2 <= a3 || a1 + a3 <= a2 || a2 + a3 <= a1) {
            throw new InvalidTriangleException(a1, a2, a3);
        }
        this.side1 = a1;
        this.side2 = a2;
        this.side3 = a3;
    }
}